package com.blyat.xsoft.kernel.component.mq.rocketmq;

/**
 * @Auther: syh
 * @Date: 2020/8/7
 * @Description:
 */
public class Carrier<T> {
    private String id;
    private T content;

    public Carrier() {}

    public Carrier(String id, T content) {
        this.id =id;
        this.content = content;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public T getContent() {
        return content;
    }

    public void setContent(T content) {
        this.content = content;
    }

    public static <T> Carrier<T> build(T content) {
        return build(null, content);
    }

    public static <T> Carrier<T> build(String id, T content) {
        return new Carrier<>(id, content);
    }
}
